Conditions | 2 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import AbstractMenuItemDispatcher from './AbstractMenuItemDispatcher'; |
||
11 | static getMenuItem(schema) { |
||
12 | if (!this.isAvailable(schema)) { |
||
13 | throw new Error('Code blocks not available in this Schmea!'); |
||
14 | } |
||
15 | return new MenuItem({ |
||
16 | command: setBlockTypeNoAttrCheck(schema.nodes.code_block), |
||
17 | icon: svgIcon('code-braces'), |
||
18 | label: 'Code Block', |
||
19 | }); |
||
20 | } |
||
21 | } |
||
22 |